local scene = director:createScene()

function scene:setUp(event)
    dbg.print("sceneInstructions:setUp")
			
	local allScaleX = 320/director.displayWidth
	local allScaleY = 480/director.displayHeight
	
	local box = director:createRectangle( {x=40/allScaleX, y=50/allScaleY, w=240/allScaleX, h=380/allScaleY, color=color.teal} )
	local labelInstructionsOne = director:createLabel({x=160/allScaleX, y=390/allScaleY, hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsTwo = director:createLabel({x=160/allScaleX, y=360/allScaleY, hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsThree = director:createLabel({x=160/allScaleX, y=330/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsFour = director:createLabel({x=160/allScaleX, y=300/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsFive = director:createLabel({x=160/allScaleX, y=270/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsSix = director:createLabel({x=160/allScaleX, y=240/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsSeven = director:createLabel({x=160/allScaleX, y=210/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsEight = director:createLabel({x=160/allScaleX, y=180/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsNine = director:createLabel({x=160/allScaleX, y=150/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsTen = director:createLabel({x=160/allScaleX, y=120/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsEleven = director:createLabel({x=160/allScaleX, y=90/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
	local labelInstructionsTwelve = director:createLabel({x=160/allScaleX, y=60/allScaleY,hAlignment="center", xAnchor=0.5, color= color.black, xScale=1/allScaleX, yScale=1/allScaleY,})
		
	labelInstructionsOne.text="You have 60"
	labelInstructionsTwo.text="seconds to make"
	labelInstructionsThree.text="the highest "
	labelInstructionsFour.text="score possible."
	labelInstructionsFive.text="If you select "
	labelInstructionsSix.text="the mole whose"
	labelInstructionsSeven.text="operation results"
	labelInstructionsEight.text="in the number "
	labelInstructionsNine.text="sought earn "
	labelInstructionsTen.text="1 point, if it is "
	labelInstructionsEleven.text="wrong loses "
	labelInstructionsTwelve.text="2 points."
		
	local buttonBack = director:createSprite(250/allScaleX, 50/allScaleY, "img/button.png")
	buttonBack.xAnchor=0.5; buttonBack.yAnchor=0.5
	buttonBack.xScale=.5/allScaleX; buttonBack.yScale=.5/allScaleY 
	buttonBack.y = buttonBack.y - buttonBack.h/2.5/allScaleY
	labelBack = director:createLabel(250/allScaleX, 0, "Back")
	labelBack.xAnchor=0.5;
	labelBack.zOrder = buttonBack.zOrder
	labelBack. hAlignment="center"
	labelBack.xScale = 1/allScaleX
	labelBack.yScale = 1/allScaleY
	
	function buttonBack:touch(event)
		if (event.phase == 'began') then
			system:sendEvent("moveToSceneMenu")
		end
	end
	buttonBack:addEventListener('touch', buttonBack)
end

function scene:tearDown(event)
    dbg.print("sceneInstructions:tearDown")
end

scene:addEventListener({"setUp", "tearDown"}, scene)

return scene -- We must return the scene object!